using UnityEngine;
using UnityEditor;
namespace Game.TerrainEditor
{
    [CustomEditor(typeof( TerrainComponent))]
    public class TerrainComponentEditor : Editor
    {
        public void OnEnable()
        {
        }

        public override void OnInspectorGUI()
        {
            EditorGUI.BeginChangeCheck();
            base.OnInspectorGUI();
            TerrainComponent t = ( TerrainComponent )target;
            if (GUILayout.Button("清楚地图"))
            {
                t.Clear();
            }
            if (GUILayout.Button("设置地图大小"))
            {
                t.SetTerrainSize();
            }

            if (GUILayout.Button("测试地图生成"))
            {
               
                t.Init();    
            }

       
            if (GUILayout.Button("测试地图生成"))
            {
               
                t.GenericTerrainByPerling();    
            }
        }
    }
}
